#1 /usr/bin/python

def fibonacci(end):
    a=0
    b=1
    c=1
    l = [a,b]
    while a < end and b < end:
      l.append(c)
      a=b
      b=c
      c=a+b
    return l

def fibn(n):
  a=0
  b=1
  c=1
  num = 0
  for i in range(n):
    num=c
    c=a+b
    a=b
    b=c
  return num

def fibrecur(n):
  if n<=1:
    return n
  return fibrecur(n-1) + fibrecur(n-2)  

def main():
  print fibonacci(4)
  print fibonacci(13)
  print ' '
  for i in range(10):
    print fibrecur(i)


if __name__ == '__main__':
  main()
